package com.zzw.hj40;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 统计字符
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int enCount = 0;
        int spaceCount = 0;
        int numCount = 0;
        int otherCount = 0;
        for (int i = 0; i < str.length(); i++) {
            if ((str.charAt(i) >= 'A' && str.charAt(i) <= 'Z') || (str.charAt(i) >= 'a' &&
                    str.charAt(i) <= 'z')) {
                enCount++;
            } else if (str.charAt(i) == ' ') {
                spaceCount++;
            } else if (str.charAt(i) >= '0' && str.charAt(i) <= '9') {
                numCount++;
            } else {
                otherCount++;
            }
        }
        System.out.println(enCount);
        System.out.println(spaceCount);
        System.out.println(numCount);
        System.out.println(otherCount);
    }
}